<?php

if(!defined('IN_AACMS') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

@include_once ROOT.'./source/aacms_version.php';


$cmenu_list = DB::getAll("SELECT * FROM ".DB::table('admincp_menu')."  ORDER BY displayorder");
$model_list = DB::getAll("SELECT mid, mname FROM ".DB::table('model')."  ORDER BY mid DESC");

foreach($cmenu_list as $key=>$memu) {
	if(preg_match('/^http:\/\//',$memu['url'])) {
		$cmenu_list[$key]['target'] = '_blank';
	} else {
		$cmenu_list[$key]['target'] = 'main';
	}
}

include template('main', 'admin');

?>